<?php
if (!ini_get('display_errors')) {
    ini_set('display_errors', 0);
}
///////// Config
require_once('functions.php');
$feed = array();
$feednews = load_rss_feed('http://vinabrand.com/news/feed/');
$feedtech = load_rss_feed('http://vinabrand.com/tech/feed/');
$feedtravel = load_rss_feed('http://vinabrand.com/travel/feed/');
$feedbrand = load_rss_feed('http://vinabrand.com/brand/feed/');
$feed = array_merge($feednews , $feedbrand ,$feedtravel,$feedtech);

$max_feed_reader ='1';
$max_mail_send ='10';
$to = load_mail_list();

	        // end if count;
$rand_feed = array_rand($feed, 1);	
$title = str_replace(' & ', ' &amp; ', $feed[$rand_feed]['title']);
$link = $feed[$rand_feed]['link'];
$description = $feed[$rand_feed]['desc'];
$date = date('l F d, Y', strtotime($feed[$rand_feed]['date']));
if (date("s")<10){
sent_mail_by_SMTP($to,$title,$description);
}else{
sent_mail_by_gmail($to,$title,$description); 
}
  		
	 // end for reader;
	

?>